package com.ls.rbac.service;

import com.ls.rbac.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liusheng
 * @since 2025--06--28
 */
public interface IPermissionService extends IService<Permission> {

    /**
     * 查询角色拥有的权限ID列表
     */
    List<Integer> getPermissionIdsByRoleId(Integer roleId);

    List<Permission> getPermissionTreeParent(List<Permission> permissionList);

    /**
     * 查询权限树
     */
    List<Permission> getPermissionTree();


    List<Permission> selectPermissionListByUserId(Integer userId);


    List<Integer> getPermissionAndChildrenIds(Integer permissionId);


    void deletePermissionAndRolePermission(Integer permissionId);

}
